home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 35 / PC Gamer IT CD 35 1-2.iso / Elink / NSCOMM / NCJS10.JAR / mainpref.js < prev    next >
Text File  |  1997-10-20  |  3KB  |  82 lines

  1. /*
  2.  * mainpref.js
  3.  * 
  4.  * Copyright (c) 1997 Netscape Communications Corporation, All Rights Reserved
  5.  * 
  6.  * Functions that manage the options dialog
  7.  */
  8.  
  9. var selectorControls = opener;
  10. var tabShowing = "";
  11.  
  12. var selectorDrawer = selectorControls.GetSelectorWindow();
  13. var selectorTab = selectorDrawer.GetSelectorTab();
  14.  
  15. function HandleOK() {
  16.     var    boolValue = false;
  17.  
  18.     // Process the display characteristics
  19.     
  20.     var layout_form = self.document.layers['layout'].document.layout_form;
  21.     var security_form = self.document.layers['security'].document.security_form;
  22.  
  23.     boolValue    = security_form.marimbaCookies.checked;
  24.     depth.SetNetscapePrefBool("netcaster.castanet.acceptCookies", boolValue)
  25.  
  26.     boolValue    = security_form.marimbaLogging.checked;
  27.     depth.SetNetscapePrefBool("netcaster.castanet.loggingEnabled", boolValue)
  28.  
  29.     boolValue    = security_form.marimbaProfiling.checked;
  30.     depth.SetNetscapePrefBool("netcaster.castanet.profileEnabled", boolValue)
  31.  
  32.     if (window.layoutLoaded) {
  33.         var drawerPos = layout_form.drawerPos.options[layout_form.drawerPos.selectedIndex].value;
  34.     //    var webtopPos = layout_form.webtopPos.options[layout_form.webtopPos.selectedIndex].value;
  35.         var webtopPos = "left";
  36.         boolValue = layout_form.autoHide.checked;
  37.  
  38.         depth.SetNetscapePref("netcaster.drawer.dock", drawerPos)
  39.         depth.SetNetscapePref("netcaster.webtopDock", webtopPos)
  40.         if (boolValue == true) {
  41.             depth.SetNetscapePref("netcaster.drawer.autoHide", "true")
  42.         } else {
  43.             depth.SetNetscapePref("netcaster.drawer.autoHide", "false")
  44.         }
  45.  
  46.         // only fix these if we've loaded the defaults in (i.e., the user's seen them)
  47.         var useDefault = layout_form.onDefault[1].checked;
  48.         
  49.         if (useDefault) {
  50.             var defaultChannelIndex = layout_form.defaultChannel.selectedIndex;
  51.             var defaultChannelItem = layout_form.defaultChannel.options[defaultChannelIndex].prototype;
  52.  
  53.             depth.SetNetscapePref("netcaster.defaultChannel", defaultChannelItem.getPrefsName())
  54.         } else {
  55.             depth.SetNetscapePref("netcaster.defaultChannel", "");
  56.         }
  57.         
  58.  
  59.         selectorTab.PositionSelector();
  60.  
  61.         // DesktopMgr.WebtopPosition("left/right");
  62.  
  63.     }
  64.  
  65.     self.close();
  66. }
  67.  
  68. function HandleHelp() {
  69.     selectorControls.HandleHelp("customizing_Netcaster");
  70. }
  71.  
  72. function PropertiesCallback(editWindow) {
  73.     if (gTabShowing != "")
  74.         document.layers[gTabShowing].PropertiesCallback(editWindow);
  75. }
  76.  
  77. function EditCallback(editWindow) {
  78.     if (gTabShowing != "")
  79.         document.layers[gTabShowing].EditCallback(editWindow);
  80. }
  81.  
  82. void(0);